{php $data = subcat('main', 0);}
{loop $data $n $r}
	{if $r[ismenu]}
	<li class="l_float">
		{php $subcat = subcat('main', $r['catid']);}
		{if $subcat}<!-- *有子元素 -->
			{php $loop = 0;}
			{loop $subcat $k $v}
				<a href="{getsubLink($v[catid]}" id="menu_{$v['catid']}">{$v[catname]}</a>
			{/loop}
		{else}
		<a href="{getsubLink($r[catid]}" id="menu_{$r['catid']}">{$r[catname]}</a>
		{/if}
	</li>
	{/if}
{/loop}